#encoding=utf-8
#查找一个最大的数，等于序列里另两个不相等的数之和

def find_c(a):
    '''unittest
    >>> find_c([1,2,3,4,5,6,7,99,100])
    100
    >>> find_c([1,2,3,4,5,6,7])
    7
    >>> find_c([1])
    >>> find_c([1,2])
    >>> find_c([3,2,1,4,4,8])
    4
    >>> find_c([3,2,1])
    3
    '''
    b = sorted(a, reverse=True)
    for i in xrange(len(b) - 1):
      m = b[i]
      for j in xrange(i+1, len(b)):
          m1 = b[j]
          if (m - m1) in b and m1 != (m-m1):
              return m

import doctest
doctest.testmod()